#{extends 'main.html' /}
#{set title:'This is the first page of gaoheng\'s playground!' /}

<div id="rightPan">
	#{ifnot entry?.id}
    	<h3>发表文章</h3>
	#{/ifnot}
	#{else}
	    <h3>修改文章</h3>
	#{/else}
	#{form @save(entry?.id)}
		<p>
        #{field 'title'}
        <label>标题:</label>
        <input type="text" name="${field.name}" 
            value="${entry?.title}" class="${field.errorClass}" />
        #{/field}
    	</p>
    	
    	<p>
        #{field 'content'}
        <label>编辑内容:</label>
        <textarea name="${field.name}" 
            class="${field.errorClass}">${entry?.content}</textarea>
        #{/field}
    	</p>
    	
    	<p>
        	<input type="submit" value="发表" />
    	</p>
    	
	#{/form}
</div>